home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs54.d81 / sgtool13.arc / CIA.ARC / CIATIMAS.C < prev    next >
C/C++ Source or Header  |  1993-08-28  |  487b  |  22 lines

  1. /*
  2. SG C Tools 1.3
  3.  
  4. (C) 1993 Steve Goldsmith
  5. All Rights Reserved
  6.  
  7. Compiled with HI-TECH C 3.09 (CP/M-80).
  8. */
  9.  
  10. #include <sys.h>
  11. #include <hitech.h>
  12. #include <cia.h>
  13.  
  14. /* set cia timer a and control reg a */
  15.  
  16. void settimeracia (ushort C, ushort Latch, uchar CtrlReg)
  17. {
  18.   outp(C+ciaTimerALo,(uchar) Latch);        /* timer latch lo */
  19.   outp(C+ciaTimerAHi,(uchar) (Latch >> 8)); /* timer latch hi */
  20.   outp(C+ciaControlA,CtrlReg);              /* set timer controls */
  21. }
  22.